#include "../include/texture.h"

void drawTextureCenter(Texture2D texture, int x, int y, Color tint) {
    int w = texture.width;
    int h = texture.height;
    DrawTexture(texture, x - w / 2, y - h / 2, tint);
}

void drawTextureCenterV(Texture2D texture, Vector2 pos, Color tint) {
    int w = texture.width;
    int h = texture.height;
    DrawTexture(texture, pos.x - w / 2, pos.y - h / 2, tint);
}

void drawTextureCenterSize(Texture2D texture, int x, int y, Color tint, int width, int height) {
    int w = texture.width;
    int h = texture.height;
    DrawTexturePro(texture, (Rectangle){0, 0, w, h}, (Rectangle){x, y, width, height}, (Vector2){width / 2, height / 2}, 0.0f, tint);
}
